<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j">
<body>
<ui:composition template="/WEB-INF/template.xhtml">
    <ui:define name="title">
        #{product.title}
    </ui:define>
    <ui:define name="topnav">
        <ui:include src="/WEB-INF/incl/store_nav.xhtml">
            <ui:param name="page" value="shop"/>
        </ui:include>
    </ui:define>

    <ui:define name="sidebar">
        <!--<ui:include src="/WEB-INF/incl/login.xhtml" />-->
        <!--<ui:include src="/WEB-INF/incl/searchbox.xhtml" />-->
        <!--<ui:include src="/WEB-INF/incl/cart.xhtml" />-->
        <ui:include src="/WEB-INF/incl/categories.xhtml"/>

    </ui:define>

    <ui:define name="body">
        <div class="productbox">
            <h2><h:outputText value="#{product.title}"/></h2>
            <!--<f:subview id="dvdimage" rendered="#{product.imageURL != null}">-->
            <!--<div class="productimage">-->
            <!--<img src="#{product.imageURL}" alt="#{product.title}" />-->
            <!--</div>-->
            <!--</f:subview>-->

            <div class="productinfo">
                <h:panelGrid id="ItemInfo" columns="2">
                    <h:outputText id="PriceText" value="Цена:"/>
                    <h:outputText id="PriceValue" value="#{product.price}">
                        <f:convertNumber type="currency" currencySymbol="руб."/>
                    </h:outputText>


                    <!--<h:outputText id="StarringText" value="В ролях:" />-->
                    <!--<h:panelGroup id="Actors">-->
                    <!--<ui:repeat value="#{product.actors}" var="starring">-->
                    <!--[#{starring.name}]-->
                    <!--</ui:repeat>-->
                    <!--</h:panelGroup>-->

                </h:panelGrid>

                <p>
                    Есть на складе<br/>
                    Изменить количество вы сможете при оформлении заказа

                </p>

                <div class="productbuttons">
                    <s:button id="AddToCartButton" action="#{search.addToCart}" value="Положить в корзину"/>
                </div>

            </div>


        </div>
        <div class="cntInfo">

            <h:graphicImage url="#{product.imageURL}" rendered="#{product.imageURL != null}" />

            <a4j:mediaOutput element="img" cacheable="false" session="true"
                             createContent="#{search.paint}" value="#{product.productId}" mimeType="image/bmp" rendered="${product.image != null}"/>
            <h:outputText value="#{product.description}" escape="false"/>
        </div>

    </ui:define>
</ui:composition>
</body>
</html>




